<div id="lecat">
<{if $actionForm->hasError()}>
  <ul class="error">
    <{foreach item=message from=$actionForm->getErrorMessages()}>
      <li><{$message|xoops_escape}></li>
    <{/foreach}>
  </ul>
<{/if}>
<form action="index.php?action=SetEdit" method="post">
  <table class="outer" summary="">
    <caption>
      <{if $actionForm->get('set_id')}>
        <{$smarty.const._MD_LECAT_LANG_SET_EDIT}>
      <{else}>
        <{$smarty.const._MD_LECAT_LANG_ADD_A_NEW_SET}>
      <{/if}>
   </caption>
   <tbody>
      <tr>
        <th class="head"><{$smarty.const._MD_LECAT_LANG_TITLE}></th>
        <td class="<{cycle values="odd,even"}>">
          <{xoops_input type=text name=title value=$actionForm->get('title') size=15 maxlength=255}>
        </td>
      </tr>
      <tr>
        <th class="head"><{$smarty.const._MD_LECAT_LANG_LEVEL}></th>
        <td class="<{cycle values="odd,even"}>">
          <{xoops_input type=text name=level value=$actionForm->get('level')}><br />
          <{$smarty.const._MD_LECAT_TIPS_LEVEL}>
        </td>
      </tr>
	    <tr>
	      <td class="head"><{$smarty.const._MD_LECAT_LANG_PERMISSION_TYPE}></td>
	      <td class="<{cycle values="odd,even"}>">
	      	<{$smarty.const._MD_LECAT_DESC_PERMISSION_TYPE}>
	      	<table id="permitOptions">
	      	<tr>
		      	<th><{$smarty.const._MD_LECAT_LANG_AUTH_KEY}></th>
		      	<th><{$smarty.const._MD_LECAT_LANG_AUTH_TITLE}></th>
		      	<th><{$smarty.const._MD_LECAT_LANG_AUTH_DEFAULT}></th>
	      	</tr>
	      	<{foreach from=$actions item=opt name=opt}>
	     		<{assign var=it value=$smarty.foreach.opt.iteration-1}>
	      	<tr>
		        <td><{xoops_input type=text name=actions_key[$it] value=$opt.key}></td>
		        <td><{xoops_input type=text name=actions_title[$it] value=$opt.title}></td>
		        <td><input type="checkbox" name="actions_default[<{$it}>]" value="1" id="legacy_xoopsform_actions_default[<{$it}>]" <{if $opt.default==1}>checked="checked" <{/if}>></td>
		      </tr>
	        <{/foreach}>
	        </table>
	        <input type="button" value="<{$smarty.const._MD_LECAT_LANG_ADD_A_NEW_PERMISSION_TYPE}>" onClick="addActionKeyForm()">
	      </td>
	    </tr>
    </tbody>
    <tfoot>
      <tr>
        <td class="foot" colspan="2">
          <{xoops_token form=$actionForm}>
          <{xoops_input type=hidden name=set_id value=$actionForm->get('set_id')}>
          <input type="submit" value="<{$smarty.const._SUBMIT}>" />
          <input type="submit" value="<{$smarty.const._CANCEL}>" name="_form_control_cancel" />
        </td>
      </tr>
    </tfoot>
  </table>
</form>
</div>
